from typing import List

from langchain.schema.document import Document

class custom_print:
    @staticmethod
    def print_all(documents: List[Document]):
        print("{:*^80}".format("开始遍历"))
        print(f'总个数：{len(documents)}')
        for document in documents:
            content = document.page_content
            print("{:-^80}".format("分割线"))
            print(f'本文本块长度：{len(content)}')
            print(content)


"""
参考：
    1.python 列表形参： https://blog.51cto.com/u_16213592/7190339
    
    
"""